/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#include "FishManager.h"

namespace Fish3D
{
	FishManager::FishManager(Ogre::SceneManager* sceneMgr)
		: _sceneMgr(sceneMgr)
	{
		loadFishes();
	}

	//xml config this?
	void FishManager::loadFishes()
	{
		FishGroup* group=0;
		group=new FishGroup(_sceneMgr,"Amemasu","Amemasu.mesh");
		_fishGroups.push_back(group);

		group=new FishGroup(_sceneMgr,"Angel","Angel.mesh");
		_fishGroups.push_back(group);

		group=new FishGroup(_sceneMgr,"BlueTang","BlueTang.mesh");
		_fishGroups.push_back(group);

		group=new FishGroup(_sceneMgr,"NeonTetra","NeonTetra.mesh");
		_fishGroups.push_back(group);


	}

	FishManager::~FishManager()
	{
	}

	void FishManager::update(float deltaT)
	{
		int cnt=_fishGroups.size();
		for(int i=0;i<cnt;++i){
			_fishGroups[i]->update(deltaT);
		}
	}
}
